﻿#ifndef RELEASENOTESMODELPARSER_H
#define RELEASENOTESMODELPARSER_H

#include "../IStore/IStore.h"
#include "ReleaseNotesDataModelTypeDef.h"

class ReleaseNotesModelParser : public IModelParser<ReleaseNotesModel>
{
public:
    explicit ReleaseNotesModelParser();

    // 转换成Json字符串
    QString toString(const ReleaseNotesModel& model) override;

private:
    // 主解析函数：从 JSON 文档解析为 ReleaseNotesModel
    ReleaseNotesModel parseFromJson(const QJsonObject &json) override;

    // 解析 NoteModel
    NoteModel parseNote(const QJsonObject &json);

    // 将 NoteModel 转换为 JSON 对象
    QJsonObject noteToJson(const NoteModel& notes);
};

#endif // RELEASENOTESMODELPARSER_H
